#include<iostream>
using namespace std;
#include<ctime>
#include<iomanip>
#include<cmath>

#include"library.h"

double f(double x){
	return x*x;
}

int main(){

	double a=0,b=1;
	int n;
	cout<<"n="; cin>>n;

        clock_t t_start = clock();
        cout<<"integ = "<<integ_midpoint(a,b,n,f)<<endl;
        clock_t t_end = clock();
        cout<<"Elapsed time: "<<setprecision(15)<<(double)(t_end-t_start)/CLOCKS_PER_SEC<<" s.\n";
	return 0;
}
